<?php
/*
 * @filename:	common.php
 * @ProjectName: mis
 * @PackageName: package_name
 *
 * Created on 2012-7-14
 *
 */
//简单封装md5
function md5x($text=''){
    	return md5("@Ligboy".md5($text."@Rliang.").$text);
}
/*
获取ajax提交的内容
*/
function getajax(){
	return file_get_contents("php://input");
}

/*
获取ajax提交的json数组
*/
function getjson(){
	return json_decode(file_get_contents("php://input"),true);
}

/*
获取ajax提交的json数组
*/
function getjsonpost(){
	if(isset($GLOBALS['POST'])){
		$GLOBALS['POST'] = array_merge($GLOBALS['POST'],json_decode(file_get_contents("php://input"),true));
	}else{
		$GLOBALS['POST'] = array();
		$GLOBALS['POST'] = json_decode(file_get_contents("php://input"),true);
	}

}
?>
